package com.yun.controller;

import com.yun.api.IHelloService1;
import com.yun.service.hello.IHelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: Mr.Liu
 * @version: 1.0.0
 * @description: 消费方
 * @create: 2022-07-19 14:24
 * @modify: 2022-07-19 14:24
 **/
@RestController
public class ConsumerController {
    @Autowired
    private IHelloService iHelloService;
    @Autowired
    private IHelloService1 iHelloService1;

    @GetMapping("/consumer/service")
    public String consumer(String msg) {
        return iHelloService.helloWorld(msg);
    }

    @GetMapping("/consumer/insertUser")
    public String insertUser() {
        String str = "{'xing':'Liu','ming':'kui'}";
        return iHelloService.insertUser(str);
    }


    @GetMapping("/sayHi")
    public String sayHi() {
        return iHelloService1.sayHi();
    }
}
